<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  div {
    display: flex;
    width: 800px;
    height: 400px;
    background-color: rgb(126, 122, 122);
    /* 设置主轴方向  不写默认是row（就是x轴方向） */
    flex-direction: row;

  }

  span {
    width: 180px;
    height: 80px;
    border: 1px solid black;
    background-color: rgb(123, 243, 243)
  }

  span:nth-child(2) {
    order: -1;
  }
</style>

<body>
  <div>
    <span>1</span>
    <span>2</span>
    <span>3</span>
    <span>4</span>

  </div>

</body>

</html>

<!--  /* 从头部开始排列  不写默认是flex-start */
    /*justify-content: flex-start;*/
    /* 从尾部开始 */
    /*justify-content: flex-end;*/
    /* 居中 */
    /*justify-content: center;*/
    /* 平均分布 */
    /*justify-content: space-around;*/
    /* 两端对齐，其余平分 */
    /*justify-content: space-between;*/ -->